//
//  FSHightTool.m
//  Trade
//
//  Created by 刘沿 on 16/4/5.
//  Copyright © 2016年 刘沿. All rights reserved.
//

#import "FSHightTool.h"

@implementation FSHightTool

+ (CGFloat)heightbyString:(NSString *)string font:(int)font minsWidth:(CGFloat)width{
    NSDictionary *dict = @{NSFontAttributeName:[UIFont systemFontOfSize:font]};

    CGRect rect = [string boundingRectWithSize:CGSizeMake(KScreenWidth - width, 0) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:dict context:nil];

    return rect.size.height;
}

@end
